package com.charlotte.study.gupao.mediator.chatroom;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author junjie.ding
 * @date 2020/3/23
 */
@Data
@AllArgsConstructor
public class User {

    private String name;

    private ChatRoom chatRoom;

    public User(String name) {
        this.name = name;
    }

    public void sendMsg(String msg){
        this.chatRoom.showMsg(this, msg);
    }


}
